<?php
require_once '../../session_user.php';
require_once $URL_ACCESO.'aMaterialMM.php';


if($codReplica) {

	$daoMM = new aMaterialMM();
	$listaMM = $daoMM->getListaMaterialMM("3", $codReplica, "1", ""	);
	
	$i = 0;
	echo "<table border='0' cellpadding='2' cellspacing='2'>";
	foreach($listaMM as $mm) {
		if($i%4 == 0) {
			echo "<tr>";
		}
		echo "<td align='center'>";
		echo "<img src='../../multimedia/replicas/".$mm->getArchivo()."' width='120' height='120' />";
		$onclick = "eliminar_mm('3','1',$codReplica,".$mm->getCod_mm().");";
		echo "<br /><a href='#' onclick=\"".$onclick."\">Eliminar</a>";
		echo "</td>";
			
		if(($i+1)%4 == 0 || ($i+1) == count($listaMM)) {
			echo "</tr>";
		}
			
		$i++;
			
	}
	echo "</table>";
}


?>